package com.cg.design.graphicdesignpattern.template;

/**
 * 具体类
 *
 * @program: LeetCode->CharDisplay
 * @description: 具体类
 * @author: cg
 * @create: 2022-03-18 21:01
 **/
public class CharDisplay extends AbstractDisplay {

    private char ch;
    public CharDisplay(char ch) {
        this.ch = ch;
    }

    @Override
    public void open() {
        System.out.print("<<");
    }

    @Override
    public void print() {
        System.out.print(ch);
    }

    @Override
    public void close() {
        System.out.println(">>");
    }
}
